Socket
Socket
Sign inDemoInstall

detect-passive-events

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-passive-events

Detect if the browser supports passive events


Version published
Weekly downloads
199K
increased by1.39%
Maintainers
1
Weekly downloads
 
Created

What is detect-passive-events?

The detect-passive-events npm package is a utility that helps developers determine if the browser supports passive event listeners. Passive event listeners can improve scrolling performance by letting the browser know that the event listener will not call preventDefault(), allowing the browser to optimize scrolling performance.

What are detect-passive-events's main functionalities?

Detect Passive Event Support

This feature allows you to check if the browser supports passive event listeners. The code sample demonstrates how to use the detect-passive-events package to log whether passive event listeners are supported.

const detectPassiveEvents = require('detect-passive-events');

if (detectPassiveEvents.hasSupport) {
  console.log('Passive event listeners are supported.');
} else {
  console.log('Passive event listeners are not supported.');
}

Other packages similar to detect-passive-events

Keywords

FAQs

Package last updated on 10 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc